<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>${applicationScope.projectName }</title>
		<link rel="stylesheet" href="${ctxPath }/css/login.css?20190411114757">
		<%-- 有项目名的时候需要定义 --%>
		<link rel="shortcut icon" type="image/x-icon" href="${ctxPath }/favicon.ico?20190226105413">
	</head>
	
	<body>
		<%-- <div class="hearder"><h2>${applicationScope.projectName }</h2></div> --%>
		<div class="login-box clearfix">
			<div class="login-hed">${applicationScope.projectName }</div>
			<div class="login-content">
				<h2>用户登录</h2>
				<form action="${ctxPathA }/login" method="post" id="loginForm">
					<shield:token/>
					<ul>
						<li><input type="text" name="userName" id="loginName" placeholder="登录账号"><span><img src="${ctxPath }/images/icon/user.jpg?20190319105452"></span></li>
						<li><input type="password" name="password" id="password" data-msg-required="请填写登录密码." placeholder="登录密码"><span><img src="${ctxPath }/images/icon/password.jpg?20190319105452"></span></li>
						<!-- 调用验证码组件 -->
						<li class="clearfix yz-li"><input style="width:60%; float: left;" type="text" name="verifyCode" id="verifyCode" placeholder="验证码" maxlength="4"/>
							<img id="verifyCode" style="float: right" alt="验证码" onclick = "this.src='${ctxPath }/verifyCode?d='+new Date()*1" src="${ctxPath }/verifyCode" width="105" height="40" />
						</li>
					</ul>
					<div class="clearfix">
						<p class="input_item">
							<input type="checkbox" id="rememberme" name="rememberme" class="checkbox" value="1"/><label for="rememberme"></label><span>记住我</span>
<c:if test="${not empty applicationScope.usetempaccount && applicationScope.usetempaccount }">
							<span title="出于安全性考虑临时账号不提供“记住账号”功能"><input type="checkbox" id="tempaccount" name="tempaccount" class="checkbox" value="1"/><label for="tempaccount" ></label><span>临时账号</span>
							</span>
</c:if>	
						</p>
						<!-- <p class="input_item"><input type="checkbox" id="ch3" name="rememberpwd" class="checkbox" /><label for="ch3"></label><span>记住密码</span></p> -->
					</div>
					<div class="form-button">
						<p><input type="submit" id="submitbtn" class="a-button" value="立即登录"/></p>
					</div>
				</form>			
			</div>
			
		</div>
		<div class="footer">版权所有 © 2020 Software Center - 绿盾技术部项目组. v${applicationScope.version }</div>
		<script type="text/javascript" src="${ctxPath }/js/lib/jquery-1.12.4.min.js?20190117152252"></script>
		<script type="text/javascript" src="${ctxPath }/js/p/login.js?20190822091858" ></script>
		<script type="text/javascript">
		var tempaccountE = $("#tempaccount");
		// 临时账号记住账号功能不可用
		if(tempaccountE.length>0){
			$("#tempaccount").change(function name() {
				var $this = $(this);
		       if($this.prop("checked")){
		    	   $("#rememberme").prop("checked", false);
		       } 
	        });
			$("#rememberme").change(function name() {
		       if($("#tempaccount").prop("checked")){
		    	   $("#rememberme").prop("checked", false);
		       } 
	        });
		}
		</script>
	</body>
</html>
